<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.17"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>QuEST: utilities.hpp Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand"><img alt="Logo" src="logo.png"/></a>
                    <a class="navbar-brand"><b>QuEST</b> v3.2.0<br>The Quantum Exact Simulation Toolkit</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_70834f0dcd10de01d2e35ab402a2238e.html">tysonjones</a></li><li class="navelem"><a class="el" href="dir_1957401ef452be7528010ba0f4832a45.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_dee4414d5d72b49a9429e079789ffd08.html">GithubRepos</a></li><li class="navelem"><a class="el" href="dir_a89b43d59316bb5045aa22bb53a67d29.html">QuEST</a></li><li class="navelem"><a class="el" href="dir_e791dcdec8c5d319683d04485e4067ac.html">tests</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">utilities.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="utilities_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef QUEST_TEST_UTILS_H</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#define QUEST_TEST_UTILS_H</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="QuEST_8h.html">QuEST.h</a>&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="QuEST__complex_8h.html">QuEST_complex.h</a>&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;catch.hpp&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">extern</span> <a class="code" href="structQuESTEnv.html">QuESTEnv</a> <a class="code" href="utilities_8hpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a>;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="utilities_8hpp.html#a2f52338126bb8cdf7fcf68eaf01c546a">   36</a></span>&#160;<span class="preprocessor">#define NUM_QUBITS 5</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">   49</a></span>&#160;<span class="keyword">typedef</span> std::vector&lt;std::vector&lt;qcomp&gt;&gt; <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">   60</a></span>&#160;<span class="keyword">typedef</span> std::vector&lt;qcomp&gt; <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="comment">/* (Excluded from Doxygen doc)</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment"> * Define QVector and QMatrix operator overloads.</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment"> * Note that QMatrix overloads don&#39;t simply use QVector </span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment"> * overloads, since the complex vector dot product involves </span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment"> * conjugation, which doesn&#39;t occur in complex matrix multiplication.</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment"> * Note too we also avoid defining operators in terms of other operators</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment"> * (e.g. minus is plus(negative times)) since compiler optimisations </span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment"> * may change the order of operations and confuse the overloads invoked.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"> * Definition of division using multiplication can furthermore </span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="comment"> * heighten numerical errors.</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment"> * @ingroup testutilities</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment"> * @author Tyson Jones</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#aed39fc3a3108b8aad424c03a4b966158">operator + </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v2);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#ade72f855c80218725aa19183723af15c">operator - </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v2);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#a1b8611d2c9af569e1265e8f48d8e0143">operator / </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;v1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v2);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#a91e707f38b1844fcbc0529ca41db816a">operator += </a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v2);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#aabfdeb43b039e628f9370507ab27529a">operator -= </a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v2);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#ac39c5776e942f283ba52e0742a98d63f">operator *= </a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#a799b92f6c9de52c7c5a4b38e30c5d395">operator /= </a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#aed39fc3a3108b8aad424c03a4b966158">operator + </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#ade72f855c80218725aa19183723af15c">operator - </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#a1b8611d2c9af569e1265e8f48d8e0143">operator / </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m, <span class="keyword">const</span> <a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a>&amp; a);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#a91e707f38b1844fcbc0529ca41db816a">operator += </a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#aabfdeb43b039e628f9370507ab27529a">operator -= </a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#ac39c5776e942f283ba52e0742a98d63f">operator *= </a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&amp; a);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#a799b92f6c9de52c7c5a4b38e30c5d395">operator /= </a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>&amp; a);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keywordtype">void</span> <a class="code" href="utilities_8hpp.html#ac39c5776e942f283ba52e0742a98d63f">operator *= </a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m1, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m2);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator * </a>(<span class="keyword">const</span> <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a>&amp; m, <span class="keyword">const</span> <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a>&amp; v);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="group__testutilities.html#gade0e7c37811a69f1c21c88c11943a19f">toQVector</a>(<a class="code" href="structQureg.html">Qureg</a> qureg);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="group__testutilities.html#gade0e7c37811a69f1c21c88c11943a19f">toQVector</a>(<a class="code" href="structDiagonalOp.html">DiagonalOp</a> op);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structQureg.html">Qureg</a> qureg);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structComplex.html">Complex</a> alpha, <a class="code" href="structComplex.html">Complex</a> beta);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structComplexMatrix2.html">ComplexMatrix2</a> src);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structComplexMatrix4.html">ComplexMatrix4</a> src);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structComplexMatrixN.html">ComplexMatrixN</a> src);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* coeffs, <a class="code" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a>* paulis, <span class="keywordtype">int</span> numQubits, <span class="keywordtype">int</span> numTerms);</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structPauliHamil.html">PauliHamil</a> hamil);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a>(<a class="code" href="structDiagonalOp.html">DiagonalOp</a> op);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160; </div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<a class="code" href="structComplexMatrix2.html">ComplexMatrix2</a> <a class="code" href="group__testutilities.html#ga731a7a71755c25ebe96e742e3fbe5812">toComplexMatrix2</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<a class="code" href="structComplexMatrix4.html">ComplexMatrix4</a> <a class="code" href="group__testutilities.html#ga216f7c25bbb0cf752d1b6fff5ea8197b">toComplexMatrix4</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga7f83695bea7d0332a577bca017dbb03c">toComplexMatrixN</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> qm, <a class="code" href="structComplexMatrixN.html">ComplexMatrixN</a> cm);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160; </div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#gaf5a18d4c00dfe0523972be3bfc666362">toQureg</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#gaf5a18d4c00dfe0523972be3bfc666362">toQureg</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> mat);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga6ccbb15b0f234e926be96a153181b63a">getZeroMatrix</a>(<span class="keywordtype">size_t</span> dim);</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#gac0c6339c28256f2aae86d443fae44455">getIdentityMatrix</a>(<span class="keywordtype">size_t</span> dim);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#gac60cee26113732c491f21dc43066b605">getExponentialOfDiagonalMatrix</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a);</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160; </div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga00f4feec845c019c3390898b0cc7f1ef">getExponentialOfPauliMatrix</a>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> angle, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a);</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga50616e813b0d0aa4f8220785d780cdff">getKroneckerProduct</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> b);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga37e0f375a6c50721aaf68153f750e842">getSwapMatrix</a>(<span class="keywordtype">int</span> qb1, <span class="keywordtype">int</span> qb2, <span class="keywordtype">int</span> numQb);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160; </div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga20f041452b43026d876fde17a5999265">getFullOperatorMatrix</a>(<span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op, <span class="keywordtype">int</span> numQubits);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160; </div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga2de7d3b138728b6beb7753b82df61803">getKetBra</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> ket, <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> bra);</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160; </div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga3cf199a7de3bbcb3546503f25be9245a">getConjugateTranspose</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160; </div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__testutilities.html#ga7125d0747a44db58115899727ac5f6be">getRandomInt</a>(<span class="keywordtype">int</span> min, <span class="keywordtype">int</span> max);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160; </div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> <a class="code" href="group__testutilities.html#gacd5aadbe10ecdedaa625f85171c0a3cd">getRandomReal</a>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> min, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> max);</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160; </div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="group__testutilities.html#ga27dc818709394cb31247e26850215f8a">getRandomQVector</a>(<span class="keywordtype">int</span> dim);</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160; </div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#gaa2e8b958e0cba07e01de9f91a5ce3c9c">getRandomQMatrix</a>(<span class="keywordtype">int</span> dim);</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160; </div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga1a5e9b668716b91dd8527ce00f7500cf">getRandomUnitary</a>(<span class="keywordtype">int</span> numQb);</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160; </div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="group__testutilities.html#gae1d2eb70b50267f8186cbd53e300d94f">getRandomStateVector</a>(<span class="keywordtype">int</span> numQb);</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160; </div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> <a class="code" href="group__testutilities.html#ga617b0fd1eb1c395762c937ad3b23e61b">getRandomDensityMatrix</a>(<span class="keywordtype">int</span> numQb);</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160; </div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;std::vector&lt;QMatrix&gt; <a class="code" href="group__testutilities.html#ga0d3b30625e2350a1e837a0b259dd3b18">getRandomKrausMap</a>(<span class="keywordtype">int</span> numQb, <span class="keywordtype">int</span> numOps);</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160; </div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> <a class="code" href="group__testutilities.html#ga5438455c2c8ecf5948ca22875313a590">getNormalised</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec);</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga75966a02c618790c1de5f0102ab8398f">setSubMatrix</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;dest, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> sub, <span class="keywordtype">size_t</span> r, <span class="keywordtype">size_t</span> c);</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160; </div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> targ1, <span class="keywordtype">int</span> targ2, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160; </div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> target, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160; </div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160; </div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span> targ, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160; </div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span>* targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span> targ1, <span class="keywordtype">int</span> targ2, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160; </div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span> targ, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160; </div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160; </div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> targ1, <span class="keywordtype">int</span> targ2, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160; </div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> target, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160; </div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160; </div>
<div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span> targ, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160; </div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span>* targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160; </div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span> ctrl, <span class="keywordtype">int</span> targ1, <span class="keywordtype">int</span> targ2, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160; </div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span> targ, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160; </div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga059fea2ee0415bf25929601ba0788164">applyReferenceMatrix</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160; </div>
<div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga059fea2ee0415bf25929601ba0788164">applyReferenceMatrix</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> &amp;state, <span class="keywordtype">int</span>* ctrls, <span class="keywordtype">int</span> numCtrls, <span class="keywordtype">int</span> *targs, <span class="keywordtype">int</span> numTargs, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> op);</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160; </div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg1, <a class="code" href="structQureg.html">Qureg</a> qureg2);</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160; </div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec);</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160; </div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> matr);</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160; </div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg1, <a class="code" href="structQureg.html">Qureg</a> qureg2, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision);</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160; </div>
<div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision);</div>
<div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160; </div>
<div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="structQureg.html">Qureg</a> qureg, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> matr, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> precision);</div>
<div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160; </div>
<div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> a, <a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> b);</div>
<div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160; </div>
<div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> a, <a class="code" href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a> b);</div>
<div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160; </div>
<div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a>(<a class="code" href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a> vec, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* reals, <a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* imags);</div>
<div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160; </div>
<div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;<a class="code" href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a> <a class="code" href="utilities_8hpp.html#a9dc43d4a0827b56cd004270a9c5b2604">expI</a>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a> phase);</div>
<div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160; </div>
<div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__testutilities.html#ga267884197cf7f1d428021cb12a57360c">calcLog2</a>(<span class="keywordtype">long</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> res);</div>
<div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160; </div>
<div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga11c465ce1a5c238946a9e09d61c94c58">setRandomPauliSum</a>(<a class="code" href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a>* coeffs, <a class="code" href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a>* codes, <span class="keywordtype">int</span> numQubits, <span class="keywordtype">int</span> numTerms);</div>
<div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160; </div>
<div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__testutilities.html#ga11c465ce1a5c238946a9e09d61c94c58">setRandomPauliSum</a>(<a class="code" href="structPauliHamil.html">PauliHamil</a> hamil);</div>
<div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160; </div>
<div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;<span class="comment">// makes below signatures more concise</span></div>
<div class="line"><a name="l00864"></a><span class="lineno"><a class="line" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">  864</a></span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">using</span> <a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen</a> = Catch::Generators::GeneratorWrapper&lt;T&gt;;</div>
<div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160; </div>
<div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a>(<span class="keywordtype">int</span>* list, <span class="keywordtype">int</span> len, <span class="keywordtype">int</span> sublen);</div>
<div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160; </div>
<div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a>(<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int&gt;</a>&amp;&amp; gen, <span class="keywordtype">int</span> numSamps, <span class="keyword">const</span> <span class="keywordtype">int</span>* exclude, <span class="keywordtype">int</span> numExclude);</div>
<div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160; </div>
<div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a>(<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int&gt;</a>&amp;&amp; gen, <span class="keywordtype">int</span> numSamps, <span class="keywordtype">int</span> excluded);</div>
<div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160; </div>
<div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a>(<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int&gt;</a>&amp;&amp; gen, <span class="keywordtype">int</span> sublen);</div>
<div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160; </div>
<div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga2e09685323c6b2312a64daf8c74b12b5">bitsets</a>(<span class="keywordtype">int</span> numBits);</div>
<div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160; </div>
<div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;int*&gt;</a> <a class="code" href="group__testutilities.html#ga181366c4cdc7786bcc066e8ac8342c1d">sequences</a>(<span class="keywordtype">int</span> base, <span class="keywordtype">int</span> numDigits);</div>
<div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160; </div>
<div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;<a class="code" href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen&lt;pauliOpType*&gt;</a> <a class="code" href="group__testutilities.html#gac102c131efa312dabd5462e6e2642975">pauliseqs</a>(<span class="keywordtype">int</span> numPaulis);</div>
<div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160; </div>
<div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;<span class="preprocessor">#endif // QUEST_TEST_UTILS_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="agroup__type_html_ga1c703cf89629e4e9c7023cd402d67028"><div class="ttname"><a href="group__type.html#ga1c703cf89629e4e9c7023cd402d67028">pauliOpType</a></div><div class="ttdeci">pauliOpType</div><div class="ttdoc">Codes for specifying Pauli operators.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00096">QuEST.h:96</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga20f041452b43026d876fde17a5999265"><div class="ttname"><a href="group__testutilities.html#ga20f041452b43026d876fde17a5999265">getFullOperatorMatrix</a></div><div class="ttdeci">QMatrix getFullOperatorMatrix(int *ctrls, int numCtrls, int *targs, int numTargs, QMatrix op, int numQubits)</div><div class="ttdoc">Takes a 2^numTargs-by-2^numTargs matrix op and a returns a 2^numQubits-by-2^numQubits matrix where op...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00293">utilities.cpp:293</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a8cc85fff30c23faa2cbed6ca0c01ce39"><div class="ttname"><a href="utilities_8hpp.html#a8cc85fff30c23faa2cbed6ca0c01ce39">CatchGen</a></div><div class="ttdeci">Catch::Generators::GeneratorWrapper&lt; T &gt; CatchGen</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8hpp_source.html#l00864">utilities.hpp:864</a></div></div>
<div class="ttc" id="aQuEST__complex_8h_html"><div class="ttname"><a href="QuEST__complex_8h.html">QuEST_complex.h</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a9dc43d4a0827b56cd004270a9c5b2604"><div class="ttname"><a href="utilities_8hpp.html#a9dc43d4a0827b56cd004270a9c5b2604">expI</a></div><div class="ttdeci">qcomp expI(qreal phase)</div><div class="ttdoc">Returns the unit-norm complex number exp(i*phase).</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00406">utilities.cpp:406</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga2b197ca736a01f05bf18fbc5c5a9bee6"><div class="ttname"><a href="group__testutilities.html#ga2b197ca736a01f05bf18fbc5c5a9bee6">applyReferenceOp</a></div><div class="ttdeci">void applyReferenceOp(QMatrix &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, QMatrix op)</div><div class="ttdoc">Modifies the density matrix state to be the result of applying the multi-target operator matrix op,...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00629">utilities.cpp:629</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga3cf199a7de3bbcb3546503f25be9245a"><div class="ttname"><a href="group__testutilities.html#ga3cf199a7de3bbcb3546503f25be9245a">getConjugateTranspose</a></div><div class="ttdeci">QMatrix getConjugateTranspose(QMatrix a)</div><div class="ttdoc">Returns the conjugate transpose of the complex square matrix a.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00179">utilities.cpp:179</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga7125d0747a44db58115899727ac5f6be"><div class="ttname"><a href="group__testutilities.html#ga7125d0747a44db58115899727ac5f6be">getRandomInt</a></div><div class="ttdeci">int getRandomInt(int min, int max)</div><div class="ttdoc">Returns a random integer between min (inclusive) and max (exclusive), from the uniform distribution.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00481">utilities.cpp:481</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga0d3b30625e2350a1e837a0b259dd3b18"><div class="ttname"><a href="group__testutilities.html#ga0d3b30625e2350a1e837a0b259dd3b18">getRandomKrausMap</a></div><div class="ttdeci">std::vector&lt; QMatrix &gt; getRandomKrausMap(int numQb, int numOps)</div><div class="ttdoc">Returns a random Kraus map of #numOps 2^numQb-by-2^numQb operators, from an undisclosed distribution.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00533">utilities.cpp:533</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga37e0f375a6c50721aaf68153f750e842"><div class="ttname"><a href="group__testutilities.html#ga37e0f375a6c50721aaf68153f750e842">getSwapMatrix</a></div><div class="ttdeci">QMatrix getSwapMatrix(int qb1, int qb2, int numQb)</div><div class="ttdoc">Returns the 2^numQb-by-2^numQb unitary matrix which swaps qubits qb1 and qb2; the SWAP gate of not-ne...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00219">utilities.cpp:219</a></div></div>
<div class="ttc" id="aQuEST_8h_html"><div class="ttname"><a href="QuEST_8h.html">QuEST.h</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga1a5e9b668716b91dd8527ce00f7500cf"><div class="ttname"><a href="group__testutilities.html#ga1a5e9b668716b91dd8527ce00f7500cf">getRandomUnitary</a></div><div class="ttdeci">QMatrix getRandomUnitary(int numQb)</div><div class="ttdoc">Returns a uniformly random (under Haar) 2^numQb-by-2^numQb unitary matrix.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00485">utilities.cpp:485</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gacd5aadbe10ecdedaa625f85171c0a3cd"><div class="ttname"><a href="group__testutilities.html#gacd5aadbe10ecdedaa625f85171c0a3cd">getRandomReal</a></div><div class="ttdeci">qreal getRandomReal(qreal min, qreal max)</div><div class="ttdoc">Returns a random real between min (inclusive) and max (exclusive), from the uniform distribution.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00410">utilities.cpp:410</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga2de7d3b138728b6beb7753b82df61803"><div class="ttname"><a href="group__testutilities.html#ga2de7d3b138728b6beb7753b82df61803">getKetBra</a></div><div class="ttdeci">QMatrix getKetBra(QVector ket, QVector bra)</div><div class="ttdoc">Returns the matrix |ket&gt;&lt;bra|, with ith-jth element ket(i) conj(bra(j)), since |ket&gt;&lt;bra| = sum_i a_i...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00159">utilities.cpp:159</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a718130cc1fc36cde991aff3d4c85c47d"><div class="ttname"><a href="utilities_8hpp.html#a718130cc1fc36cde991aff3d4c85c47d">QUEST_ENV</a></div><div class="ttdeci">QuESTEnv QUEST_ENV</div><div class="ttdoc">The single QuESTEnv environment created before the Catch tests begin, and destroyed thereafter.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00020">main.cpp:20</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a799b92f6c9de52c7c5a4b38e30c5d395"><div class="ttname"><a href="utilities_8hpp.html#a799b92f6c9de52c7c5a4b38e30c5d395">operator/=</a></div><div class="ttdeci">void operator/=(QVector &amp;v1, const qcomp &amp;a)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00073">utilities.cpp:73</a></div></div>
<div class="ttc" id="astructComplexMatrix4_html"><div class="ttname"><a href="structComplexMatrix4.html">ComplexMatrix4</a></div><div class="ttdoc">Represents a 4x4 matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00125">QuEST.h:125</a></div></div>
<div class="ttc" id="astructQuESTEnv_html"><div class="ttname"><a href="structQuESTEnv.html">QuESTEnv</a></div><div class="ttdoc">Information about the environment the program is running in.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00242">QuEST.h:242</a></div></div>
<div class="ttc" id="astructComplexMatrixN_html"><div class="ttname"><a href="structComplexMatrixN.html">ComplexMatrixN</a></div><div class="ttdoc">Represents a general 2^N by 2^N matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00136">QuEST.h:136</a></div></div>
<div class="ttc" id="agroup__type_html_ga7740e349b4f8bae6451547680f0ce2d6"><div class="ttname"><a href="group__type.html#ga7740e349b4f8bae6451547680f0ce2d6">qreal</a></div><div class="ttdeci">#define qreal</div></div>
<div class="ttc" id="agroup__testutilities_html_gaf5a18d4c00dfe0523972be3bfc666362"><div class="ttname"><a href="group__testutilities.html#gaf5a18d4c00dfe0523972be3bfc666362">toQureg</a></div><div class="ttdeci">void toQureg(Qureg qureg, QVector vec)</div><div class="ttdoc">Initialises the state-vector qureg to have the same amplitudes as vec.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01026">utilities.cpp:1026</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga267884197cf7f1d428021cb12a57360c"><div class="ttname"><a href="group__testutilities.html#ga267884197cf7f1d428021cb12a57360c">calcLog2</a></div><div class="ttdeci">unsigned int calcLog2(long unsigned int res)</div><div class="ttdoc">Returns log2 of numbers which must be gauranteed to be 2^n.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST__validation_8c_source.html#l00292">QuEST_validation.c:292</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga00f4feec845c019c3390898b0cc7f1ef"><div class="ttname"><a href="group__testutilities.html#ga00f4feec845c019c3390898b0cc7f1ef">getExponentialOfPauliMatrix</a></div><div class="ttdeci">QMatrix getExponentialOfPauliMatrix(qreal angle, QMatrix a)</div><div class="ttdoc">Returns the matrix exponential of a kronecker product of pauli matrices (or of any involutory matrice...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00205">utilities.cpp:205</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga11c465ce1a5c238946a9e09d61c94c58"><div class="ttname"><a href="group__testutilities.html#ga11c465ce1a5c238946a9e09d61c94c58">setRandomPauliSum</a></div><div class="ttdeci">void setRandomPauliSum(qreal *coeffs, pauliOpType *codes, int numQubits, int numTerms)</div><div class="ttdoc">Populates the coeffs array with random qreals in (-5, 5), and populates codes with random Pauli codes...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01054">utilities.cpp:1054</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga7f83695bea7d0332a577bca017dbb03c"><div class="ttname"><a href="group__testutilities.html#ga7f83695bea7d0332a577bca017dbb03c">toComplexMatrixN</a></div><div class="ttdeci">void toComplexMatrixN(QMatrix qm, ComplexMatrixN cm)</div><div class="ttdoc">Initialises cm with the values of qm.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00858">utilities.cpp:858</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac9263a65c96a458b810b20baa81c5b94"><div class="ttname"><a href="group__testutilities.html#gac9263a65c96a458b810b20baa81c5b94">QVector</a></div><div class="ttdeci">std::vector&lt; qcomp &gt; QVector</div><div class="ttdoc">A complex vector, which can be zero-initialised with QVector(numAmps).</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8hpp_source.html#l00060">utilities.hpp:60</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga75966a02c618790c1de5f0102ab8398f"><div class="ttname"><a href="group__testutilities.html#ga75966a02c618790c1de5f0102ab8398f">setSubMatrix</a></div><div class="ttdeci">void setSubMatrix(QMatrix &amp;dest, QMatrix sub, size_t r, size_t c)</div><div class="ttdoc">Modifies dest by overwriting its submatrix (from top-left corner (r, c) to bottom-right corner (r + d...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00211">utilities.cpp:211</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gade0e7c37811a69f1c21c88c11943a19f"><div class="ttname"><a href="group__testutilities.html#gade0e7c37811a69f1c21c88c11943a19f">toQVector</a></div><div class="ttdeci">QVector toQVector(Qureg qureg)</div><div class="ttdoc">Returns an equal-size copy of the given state-vector qureg.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00938">utilities.cpp:938</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga181366c4cdc7786bcc066e8ac8342c1d"><div class="ttname"><a href="group__testutilities.html#ga181366c4cdc7786bcc066e8ac8342c1d">sequences</a></div><div class="ttdeci">CatchGen&lt; int * &gt; sequences(int base, int numDigits)</div><div class="ttdoc">Returns a Catch2 generator of every numDigits-length sequence in the given base, in increasing lexogr...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01273">utilities.cpp:1273</a></div></div>
<div class="ttc" id="agroup__type_html_gad863c5878a01051a2726ce94bf365428"><div class="ttname"><a href="group__type.html#gad863c5878a01051a2726ce94bf365428">qcomp</a></div><div class="ttdeci">#define qcomp</div></div>
<div class="ttc" id="agroup__testutilities_html_ga216f7c25bbb0cf752d1b6fff5ea8197b"><div class="ttname"><a href="group__testutilities.html#ga216f7c25bbb0cf752d1b6fff5ea8197b">toComplexMatrix4</a></div><div class="ttdeci">ComplexMatrix4 toComplexMatrix4(QMatrix qm)</div><div class="ttdoc">Returns a ComplexMatrix4 copy of QMatix qm.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00852">utilities.cpp:852</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac0737242d0628e61e3b2a9d39ed0acc6"><div class="ttname"><a href="group__testutilities.html#gac0737242d0628e61e3b2a9d39ed0acc6">areEqual</a></div><div class="ttdeci">bool areEqual(Qureg qureg1, Qureg qureg2)</div><div class="ttdoc">Performs a hardware-agnostic comparison of the given quregs, checking whether the difference between ...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00724">utilities.cpp:724</a></div></div>
<div class="ttc" id="astructDiagonalOp_html"><div class="ttname"><a href="structDiagonalOp.html">DiagonalOp</a></div><div class="ttdoc">Represents a diagonal complex operator on the full Hilbert state of a Qureg.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00178">QuEST.h:178</a></div></div>
<div class="ttc" id="astructPauliHamil_html"><div class="ttname"><a href="structPauliHamil.html">PauliHamil</a></div><div class="ttdoc">Represents a weighted sum of pauli products.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00158">QuEST.h:158</a></div></div>
<div class="ttc" id="autilities_8hpp_html_aabfdeb43b039e628f9370507ab27529a"><div class="ttname"><a href="utilities_8hpp.html#aabfdeb43b039e628f9370507ab27529a">operator-=</a></div><div class="ttdeci">void operator-=(QVector &amp;v1, const QVector &amp;v2)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00067">utilities.cpp:67</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gae1d2eb70b50267f8186cbd53e300d94f"><div class="ttname"><a href="group__testutilities.html#gae1d2eb70b50267f8186cbd53e300d94f">getRandomStateVector</a></div><div class="ttdeci">QVector getRandomStateVector(int numQb)</div><div class="ttdoc">Returns a random numQb-length L2-normalised state-vector from an undisclosed distribution.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00453">utilities.cpp:453</a></div></div>
<div class="ttc" id="autilities_8hpp_html_ade72f855c80218725aa19183723af15c"><div class="ttname"><a href="utilities_8hpp.html#ade72f855c80218725aa19183723af15c">operator-</a></div><div class="ttdeci">QVector operator-(const QVector &amp;v1, const QVector &amp;v2)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00033">utilities.cpp:33</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gaa2e8b958e0cba07e01de9f91a5ce3c9c"><div class="ttname"><a href="group__testutilities.html#gaa2e8b958e0cba07e01de9f91a5ce3c9c">getRandomQMatrix</a></div><div class="ttdeci">QMatrix getRandomQMatrix(int dim)</div><div class="ttdoc">Returns a dim-by-dim complex matrix, where the real and imaginary value of each element are independe...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00368">utilities.cpp:368</a></div></div>
<div class="ttc" id="astructQureg_html"><div class="ttname"><a href="structQureg.html">Qureg</a></div><div class="ttdoc">Represents a system of qubits.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00203">QuEST.h:203</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac102c131efa312dabd5462e6e2642975"><div class="ttname"><a href="group__testutilities.html#gac102c131efa312dabd5462e6e2642975">pauliseqs</a></div><div class="ttdeci">CatchGen&lt; pauliOpType * &gt; pauliseqs(int numPaulis)</div><div class="ttdoc">Returns a Catch2 generator of every numPaulis-length set of Pauli-matrix types (or base-4 integers).</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01278">utilities.cpp:1278</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a4e8b82fba42c4fc52bf663082df09443"><div class="ttname"><a href="utilities_8hpp.html#a4e8b82fba42c4fc52bf663082df09443">operator*</a></div><div class="ttdeci">QVector operator*(const qcomp &amp;a, const QVector &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00040">utilities.cpp:40</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gabbc686f5f40eff22e08a2b2012ac4e41"><div class="ttname"><a href="group__testutilities.html#gabbc686f5f40eff22e08a2b2012ac4e41">QMatrix</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; qcomp &gt; &gt; QMatrix</div><div class="ttdoc">A complex square matrix.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8hpp_source.html#l00049">utilities.hpp:49</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga731a7a71755c25ebe96e742e3fbe5812"><div class="ttname"><a href="group__testutilities.html#ga731a7a71755c25ebe96e742e3fbe5812">toComplexMatrix2</a></div><div class="ttdeci">ComplexMatrix2 toComplexMatrix2(QMatrix qm)</div><div class="ttdoc">Returns a ComplexMatrix2 copy of QMatix qm.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00846">utilities.cpp:846</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga35add15146aa606b256df79334b867d5"><div class="ttname"><a href="group__testutilities.html#ga35add15146aa606b256df79334b867d5">sublists</a></div><div class="ttdeci">CatchGen&lt; int * &gt; sublists(int *list, int len, int sublen)</div><div class="ttdoc">Returns a Catch2 generator of every length-sublen sublist of length-len list, in increasing lexograph...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01199">utilities.cpp:1199</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga5438455c2c8ecf5948ca22875313a590"><div class="ttname"><a href="group__testutilities.html#ga5438455c2c8ecf5948ca22875313a590">getNormalised</a></div><div class="ttdeci">QVector getNormalised(QVector vec)</div><div class="ttdoc">Returns an L2-normalised copy of vec, using Kahan summation for improved accuracy.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00431">utilities.cpp:431</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac0c6339c28256f2aae86d443fae44455"><div class="ttname"><a href="group__testutilities.html#gac0c6339c28256f2aae86d443fae44455">getIdentityMatrix</a></div><div class="ttdeci">QMatrix getIdentityMatrix(size_t dim)</div><div class="ttdoc">Returns a dim-by-dim identity matrix.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00151">utilities.cpp:151</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga50616e813b0d0aa4f8220785d780cdff"><div class="ttname"><a href="group__testutilities.html#ga50616e813b0d0aa4f8220785d780cdff">getKroneckerProduct</a></div><div class="ttdeci">QMatrix getKroneckerProduct(QMatrix a, QMatrix b)</div><div class="ttdoc">Returns the kronecker product of a and b, where a and b are square but possibly differently-sized com...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00169">utilities.cpp:169</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga617b0fd1eb1c395762c937ad3b23e61b"><div class="ttname"><a href="group__testutilities.html#ga617b0fd1eb1c395762c937ad3b23e61b">getRandomDensityMatrix</a></div><div class="ttdeci">QMatrix getRandomDensityMatrix(int numQb)</div><div class="ttdoc">Returns a random numQb-by-numQb density matrix, from an undisclosed distribution, in a very mixed sta...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00457">utilities.cpp:457</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a1b8611d2c9af569e1265e8f48d8e0143"><div class="ttname"><a href="utilities_8hpp.html#a1b8611d2c9af569e1265e8f48d8e0143">operator/</a></div><div class="ttdeci">QVector operator/(const QVector &amp;v, const qcomp &amp;a)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00049">utilities.cpp:49</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga4c4ce1767ee2ef420c0078ea5991aeb0"><div class="ttname"><a href="group__testutilities.html#ga4c4ce1767ee2ef420c0078ea5991aeb0">toQMatrix</a></div><div class="ttdeci">QMatrix toQMatrix(Qureg qureg)</div><div class="ttdoc">Returns an equal-size copy of the given density matrix qureg.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00896">utilities.cpp:896</a></div></div>
<div class="ttc" id="agroup__testutilities_html_gac60cee26113732c491f21dc43066b605"><div class="ttname"><a href="group__testutilities.html#gac60cee26113732c491f21dc43066b605">getExponentialOfDiagonalMatrix</a></div><div class="ttdeci">QMatrix getExponentialOfDiagonalMatrix(QMatrix a)</div><div class="ttdoc">Returns the matrix exponential of a diagonal, square, complex matrix.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00187">utilities.cpp:187</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga6ccbb15b0f234e926be96a153181b63a"><div class="ttname"><a href="group__testutilities.html#ga6ccbb15b0f234e926be96a153181b63a">getZeroMatrix</a></div><div class="ttdeci">QMatrix getZeroMatrix(size_t dim)</div><div class="ttdoc">Returns a dim-by-dim square complex matrix, initialised to all zeroes.</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00143">utilities.cpp:143</a></div></div>
<div class="ttc" id="autilities_8hpp_html_ac39c5776e942f283ba52e0742a98d63f"><div class="ttname"><a href="utilities_8hpp.html#ac39c5776e942f283ba52e0742a98d63f">operator*=</a></div><div class="ttdeci">void operator*=(QVector &amp;v1, const qcomp &amp;a)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00070">utilities.cpp:70</a></div></div>
<div class="ttc" id="astructComplex_html"><div class="ttname"><a href="structComplex.html">Complex</a></div><div class="ttdoc">Represents one complex number.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00103">QuEST.h:103</a></div></div>
<div class="ttc" id="autilities_8hpp_html_a91e707f38b1844fcbc0529ca41db816a"><div class="ttname"><a href="utilities_8hpp.html#a91e707f38b1844fcbc0529ca41db816a">operator+=</a></div><div class="ttdeci">void operator+=(QVector &amp;v1, const QVector &amp;v2)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00064">utilities.cpp:64</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga27dc818709394cb31247e26850215f8a"><div class="ttname"><a href="group__testutilities.html#ga27dc818709394cb31247e26850215f8a">getRandomQVector</a></div><div class="ttdeci">QVector getRandomQVector(int dim)</div><div class="ttdoc">Returns a dim-length vector with random complex amplitudes in the square joining {-1-i,...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00420">utilities.cpp:420</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga059fea2ee0415bf25929601ba0788164"><div class="ttname"><a href="group__testutilities.html#ga059fea2ee0415bf25929601ba0788164">applyReferenceMatrix</a></div><div class="ttdeci">void applyReferenceMatrix(QVector &amp;state, int *ctrls, int numCtrls, int *targs, int numTargs, QMatrix op)</div><div class="ttdoc">Modifies the state-vector state to be the result of left-multiplying the multi-target operator matrix...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00686">utilities.cpp:686</a></div></div>
<div class="ttc" id="agroup__testutilities_html_ga2e09685323c6b2312a64daf8c74b12b5"><div class="ttname"><a href="group__testutilities.html#ga2e09685323c6b2312a64daf8c74b12b5">bitsets</a></div><div class="ttdeci">CatchGen&lt; int * &gt; bitsets(int numBits)</div><div class="ttdoc">Returns a Catch2 generator of every numBits-length bit-set, in increasing lexographic order,...</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l01268">utilities.cpp:1268</a></div></div>
<div class="ttc" id="autilities_8hpp_html_aed39fc3a3108b8aad424c03a4b966158"><div class="ttname"><a href="utilities_8hpp.html#aed39fc3a3108b8aad424c03a4b966158">operator+</a></div><div class="ttdeci">QVector operator+(const QVector &amp;v1, const QVector &amp;v2)</div><div class="ttdef"><b>Definition:</b> <a href="utilities_8cpp_source.html#l00026">utilities.cpp:26</a></div></div>
<div class="ttc" id="astructComplexMatrix2_html"><div class="ttname"><a href="structComplexMatrix2.html">ComplexMatrix2</a></div><div class="ttdoc">Represents a 2x2 matrix of complex numbers.</div><div class="ttdef"><b>Definition:</b> <a href="QuEST_8h_source.html#l00114">QuEST.h:114</a></div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
</body>
        <script type="text/javascript" src="boot.js"></script>
</html>
